package com.bw.home.api

import com.bw.home.entity.DanMuEntity
import com.bw.lib_net.BaseRes
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface DanMuApi {

    //获取弹幕
    @GET("/bulletscreen/getBulletScreenInfo")
    suspend fun getDanMu(
        @Query("datatype") type: Int,
        @Query("itemid") id: String
    ): BaseRes<List<DanMuEntity>>

    //发送弹幕
    @POST("/bulletscreen/publishBulletScreen")
    suspend fun sendDanMu(@Body entity: DanMuEntity): BaseRes<DanMuEntity>

    //删除弹幕
    @DELETE("/bulletscreen/removeBulletScreen")
    suspend fun deleteDanMu(@Query("id") id: Int): BaseRes<Boolean>
}